package com.xuecheng.ucenter.web;

import com.xuecheng.api.user.UcenterControllerApi;
import com.xuecheng.framework.domain.ucenter.ext.XcUserExt;
import com.xuecheng.ucenter.service.UcenterService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author: gongfy
 * @create: 2020/8/28 15:36
 * @Description: 用户中心controller
 */
@RestController
@RequestMapping(value = "/ucenter")
@Slf4j
public class UcenterController implements UcenterControllerApi {

    @Autowired
    private UcenterService ucenterService;

    /**
    * @Author: gongfy
    * @Param: username 账号名称
    * @Return: XcUserExt 用户信息及用户权限信息实体类
    * @Date: 2020/8/28 15:39
    * @Description: 根据账户名称查询用户信息
    **/
    @Override
    @GetMapping(value = "/getuserext")
    public XcUserExt getUserExt(@RequestParam("username") String username) {
        return ucenterService.getUserExt(username);
    }














}
